def write():
    # with 关键字 自动帮助关闭资源
    with open('aa.txt', 'w', encoding='utf-8') as file:
        file.write('杭州亚运会')